from re import findall

if __name__ == '__main__':
    text= "abaaaabbbbbbaaaa"
    pattern = "ab"

    results = findall(pattern=pattern, string=text)

    print(type(results))

    for result in results:
        print(type(result))
        print(result)